<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="DataBase.Reset"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";

	Reset res = (Reset) request.getAttribute("reset_add");
	String IP[] = res.getDs_IP().split("\\.");
	String time[] = res.getAsmt_time().split("\\-");
%>


<%
	String ddd = (String) request.getAttribute("update");
	if (ddd != null) {
		if (ddd.equals("no"))
			out.print("<script type=\"text/javascript\">alert(\""
					+ "修改失败！" + "\")</script>");
		else
			out.print("<script type=\"text/javascript\">alert(\""
					+ "修改成功！" + "\")</script>");
	}
%>




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'reset_add.jsp' starting page</title>
		<script language="javascript" type="text/javascript"
			src="<%=path%>/Jsp/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript" src="<%=path%>/Jsp/js/myfunction.js"></script> 
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->







		<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #F8F9FA;
}
-->
</style>

		<link href="<%=path%>/Jsp/images/skin.css" rel="stylesheet"
			type="text/css" />
		<style type="text/css">
<!--
.STYLE1 {
	font-size: 12px
}
-->
</style>


	</head>


	<body>

		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="17" height="29" valign="top"
					background="<%=path%>/Jsp/images/mail_leftbg.gif">
					<img src="<%=path%>/Jsp/images/left-top-right.gif" width="17"
						height="29" />
				</td>
				<td width="935" height="29" valign="top"
					background="<%=path%>/Jsp/images/content-bg.gif">
					<table width="100%" height="31" border="0" cellpadding="0"
						cellspacing="0" class="left_topbg" id="table2">
						<tr>
							<td height="31">
								<span class="STYLE1">当前位置：修改任务->修改</span>
							</td>
						</tr>
					</table>
				</td>
				<td width="16" valign="top"
					background="<%=path%>/Jsp/images/mail_rightbg.gif">
					<img src="<%=path%>/Jsp/images/nav-right-bg.gif" width="16"
						height="29" />
				</td>
			</tr>
			<tr>
				<td height="71" valign="middle"
					background="<%=path%>/Jsp/images/mail_leftbg.gif">
					&nbsp;
				</td>
				<td valign="top" bgcolor="#F7F8F9">
					<table width="100%" height="138" border="0" cellpadding="0"
						cellspacing="0">
						<tr>
							<td height="13" valign="top">
								&nbsp;
							</td>
						</tr>
						<tr>
							<td valign="top">
								<table width="98%" border="0" align="center" cellpadding="0"
									cellspacing="0">
									<tr>
										<td height="20">
											<table width="100%" height="1" border="0" cellpadding="0"
												cellspacing="0" bgcolor="#CCCCCC">
												<tr>
													<td></td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" height="55" border="0" cellpadding="0"
												cellspacing="0">
												<tr>
													<td width="10%" height="55" valign="middle">
														<img src="<%=path%>/Jsp/images/title.gif" width="54"
															height="55">
													</td>
													<td width="90%" valign="top">
														<span class="left_txt2">在这里，您可以根据您的要求，添加新的备份任务</span><span
															class="left_txt2">！</span>
														<br>
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											&nbsp;
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" height="31" border="0" cellpadding="0"
												cellspacing="0" class="nowtable">
												<tr>
													<td class="left_bt2">
														&nbsp;&nbsp;&nbsp;任务设置
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td height="289">
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<form name="main" method="POST"
													action="<%=path%>/servlet/Reset_addUpdateServlet">
													<input type="hidden" value=<%=res.getDs_ID()%> name="ds_ID">
													<tr>
														<td height="30" align="right" class="left_txt2">
															任务名：
														</td>
														<td>
															&nbsp;
														</td>
														<td height="30">
															<input type="text" value=<%=res.getAsmt_name()%>
																name="asmt_name" size="30" />
														</td>
														<td height="30" class="left_txt">
															任务名称
														</td>
													</tr>

													<tr>
														<td height="30" align="right" class="left_txt2">
															主机名：
														</td>
														<td>
															&nbsp;
														</td>
														<td height="30">
															<input type="text" disabled="true"
																value=<%=res.getDs_hostname()%> name="ds_hostname"
																size="30" />
														</td>
														<td height="30" class="left_txt">
															计算机名
														</td>
													</tr>

													<!-- 				<tr>
															<td height="30" align="right" class="left_txt2">
																数据源IP：
															</td>
															<td>
																&nbsp;
															</td>
															<td height="30">
																<input type="text" disabled="true" value=<%=res.getDs_IP()%> name="ds_IP"
																	size="30" />
															</td>
															<td height="30" class="left_txt">
																主机IP地址
															</td>
														</tr>

										 -->

													<tr>
														<td height="30" align="right" class="left_txt2">
															源数据IP：
														</td>
														<td>
															&nbsp;
														</td>
														<td height="30">
															<table>
																<tr height="30">
																	<td>
																		<input name="ip1" type="text" style="width: 40px"
																			disabled="true" onBlur="checkDate(this,225);"
																			onKeyDown="KeyDown(this)" onKeypress="Keypress(this)"
																			size="3" value=<%=IP[0]%> maxlength="3">
																		.
																	</td>
																	<td>
																		<input name="ip2" type="text" style="width: 40px"
																			disabled="true" onBlur="checkDate(this,255);"
																			onKeyDown="KeyDown(this)" onKeypress="Keypress(this)"
																			size="3" value=<%=IP[1]%> maxlength="3">
																		.
																	</td>
																	<td>
																		<input name="ip3" type="text" style="width: 40px"
																			disabled="true" onBlur="checkDate(this,255);"
																			onKeyDown="KeyDown(this)" onKeypress="Keypress(this)"
																			size="3" value=<%=IP[2]%> maxlength="3">
																		.
																	</td>
																	<td>
																		<input name="ip4" type="text" style="width: 40px"
																			disabled="true" onBlur="checkDate(this,255);"
																			onKeyDown="KeyDown(this)" onKeypress="Keypress(this)"
																			size="3" value=<%=IP[3]%> maxlength="3">
																	</td>
																</tr>
															</table>
														</td>
														<td height="30" class="left_txt">
															元数据所在电脑的IP
														</td>
													</tr>
													<tr>
														<td height="30" align="right" bgcolor="#f2f2f2"
															class="left_txt2">
															源数据路径：
														</td>
														<td bgcolor="#f2f2f2">
															&nbsp;
														</td>
														<td height="30" bgcolor="#f2f2f2">
															<div align="left">
																<input type="input" disabled="true"
																	value=<%=res.getAsmt_path()%> name="asmt_path" />
															</div>
														</td>
														<td height="30" bgcolor="#f2f2f2" class="left_txt">
															要备份数据的位置
														</td>
													</tr>

													<!--			<tr>
															<td height="30" align="right" class="left_txt2">
																下次备份日期：
															</td>
															<td>
																&nbsp;
															</td>
															<td>
																<input class="Wdate"  name="asmt_next" type="text"
																	value=<%=res.getAsmt_next()%> onClick=
	WdatePicker();
>
															</td>
															<td height="30" class="left_txt">
																设置备份日期
															</td>
														</tr>

														<tr>
															<td height="30" align="right" bgcolor="#F7F8F9"
																class="left_txt2">
																备份时间：
															</td>
															<td bgcolor="#F7F8F9">
																&nbsp;
															</td>
															<td height="30" bgcolor="#F7F8F9">

																<input type="text" name="asmt_time"
																	value=<%=res.getAsmt_time()%> size="5" />

																<td height="30" bgcolor="#F7F8F9" class="left_txt">
																	设置小时和分钟，格式：HH-MM
																</td>
														</tr>

													  	<tr>
															<td height="30" align="right" bgcolor="#F2F2F2"
																class="left_txt2">
																备份频率：
															</td>
															<td bgcolor="#F2F2F2">
																&nbsp;
															</td>
															<td height="30" bgcolor="#F2F2F2">
																<input name="asmt_frequency" value=<%=res.getAsmt_frequency()%>
																	type="text" size="5" />
																天
															</td>
															<td height="30" bgcolor="#F2F2F2" class="left_txt">
																设置备份频率
															</td>
														</tr>  -->


													<tr>
														<td height="30" align="right" bgcolor="#F2F2F2"
															class="left_txt2">
															备份频率：
														</td>
														<td bgcolor="#F2F2F2">
															&nbsp;
														</td>
														<td height="30" bgcolor="#F2F2F2">
															每间隔
															 <input name="asmt_frequency" type="text" value="1" size="3" maxlength="3" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
											                 <select name = "asmt_frequencyMain" onChange="javaScript:changemaintype(document.main.asmt_frequencyMain.options[document.main.asmt_frequencyMain.selectedIndex].value);">
											                       <option value = "">--请选择--</option>
											                       <option value = "1">&nbsp;&nbsp;&nbsp;&nbsp;天</option>
											                       <option value = "2">&nbsp;&nbsp;&nbsp;&nbsp;周</option>
											                       <option value = "3">&nbsp;&nbsp;&nbsp;&nbsp;月</option>
											                 </select>
														</td>
														<td height="30" bgcolor="#F2F2F2" class="left_txt">
															设置备份频率
														</td>
													</tr>

													<tr>
														<td height="30" align="right" bgcolor="#F2F2F2"
															class="left_txt2">
															具体日期：
														</td>
														<td bgcolor="#F2F2F2">
															&nbsp;
														</td>
														<td height="30" bgcolor="#F2F2F2">
															<select name="asmt_frequencyDetail">
																<option value="">
																	具体日期
																</option>
															</select>
														</td>
														<td height="30" bgcolor="#F2F2F2" class="left_txt">
															具体时间点
														</td>
													</tr>


													<tr>
														<td height="30" align="right" bgcolor="#F7F8F9"
															class="left_txt2">
															备份时间：
														</td>
														<td bgcolor="#F7F8F9">
															&nbsp;

														</td>
														<td height="30" bgcolor="#F7F8F9">
															<label>
																<input name="hour" type="text" size="2"
																	onBlur="checkDate(this,23);"
																	onKeypress="KeypressTime(this)" value=<%=time[0]%>
																	maxlength="2" />
															</label>
															时
															<label>
																<input name="minute" type="text" size="2"
																	onBlur="checkDate(this,59);"
																	onKeypress="KeypressTime(this)" value=<%=time[1]%>
																	maxlength="2" />
															</label>
															分
															<td height="30" bgcolor="#F7F8F9" class="left_txt">
																设置备份时间
															</td>
													</tr>
											</table>
										</td>
									</tr>
								</table>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">

									<tr>
										<td width="30%" height="10" align="right">
											<input type="submit" value="完成" />
										</td>
										<td width="6%" height="10" align="right">
											&nbsp;
										</td>
										<td width="44%" height="10">
											<input type="reset" value="取消" />
										</td>
									</tr>

								</table>
								</form>
							</td>
						</tr>
					</table>
				</td>
				<td background="<%=path%>/Jsp/images/mail_rightbg.gif">
					&nbsp;
				</td>
			</tr>
			<tr>
				<td valign="middle"
					background="<%=path%>/Jsp/images/mail_leftbg.gif">
					<img src="<%=path%>/Jsp/images/buttom_left2.gif" width="17"
						height="17" />
				</td>
				<td height="17" valign="top"
					background="<%=path%>/Jsp/images/buttom_bgs.gif">
					<img src="<%=path%>/Jsp/images/buttom_bgs.gif" width="17"
						height="17" />
				</td>
				<td background="<%=path%>/Jsp/images/mail_rightbg.gif">
					<img src="<%=path%>/Jsp/images/buttom_right2.gif" width="16"
						height="17" />
				</td>
			</tr>
		</table>

	</body>
	--
</html>
